<?php
	function Teg($type="",$content="",$param="")
	{
		if($type!="")return '<'.$type.' '.$param.'>'.$content.'</'.$type.'>';
		
	}	

	function Tr($content="",$param="")
	{
		return Teg("tr",$content,$param);
	}		
	function Td($content="",$param="")
	{
		return Teg("td",$content,$param);
	}	
	function Th($content="",$param="")
	{
		return Teg("th",$content,$param);
	}	
	
	function Td_n($n=1,$content="",$param="")
	{
		for($k=0;$k<$n;$k++)$s.=Td($content,$param);
		return $s;
	}
	
	function Th_n($n=1,$content="",$param="")
	{
		for($k=0;$k<$n;$k++)$s.=Th($content,$param);
		return $s;
	}
	
	function Tr_n($n=1,$content="",$param="")
	{
		for($k=0;$k<$n;$k++)$s.=Tr($content,$param);
		return $s;
	}
	

	
	
	function Table($content="",$param="")
	{
		return Teg("table",$content,$param);
	}
	
		function Thead($content="",$param="")
	{
		return Teg("thead",$content,$param);
	}
	
	function Tbody($content="",$param="")
	{
		return Teg("tbody",$content,$param);
	}
	
		function Tfoot($content="",$param="")
	{
		return Teg("tfoot",$content,$param);
	}
	
	
	function Iframe($src="",$param="")
	{
		return Teg("iframe","","src= $src $param");
	}
	
	function Frame($content="",$param="")
	{
		return Teg("frame",$content,$param);
	}
	
		function Img($src="",$param="")
	{
		return Teg("img","","src= $src $param");
	}
	
	
		function Div($content="",$param="")
	{
		return Teg("div",$content,$param);
	}
	
		function Span($content="",$param="")
	{
		return Teg("span",$content,$param);
	}
	
		function P($content="",$param="")
	{
		return Teg("p",$content,$param);
	}
	////////////////////////////
	
		
	function Td_arr($contarr=array(),$param="")
	{
		foreach($contarr as $cont)$s.=Td($cont,$param);
		return $s;
	}
	/////////////////////cool function
		
		function br($n=1)
		{
			for($k=0;$k<$n;$k++)$s.='<br/>';
			return $s;
		}

		
		function sp($n=1)
	{
		for($k=0;$k<$n;$k++)$s.=' ';
		return $s;
	}
	
				function datablock($c="",$m="",$w="",$s="",$com_attr="",$c_attr="",$m_attr="",$w_attr="",$s_attr="")
	{
		return Td($c,$com_attr.' '.$c_attr).Td($m,$com_attr.' '.$m_attr).Td($w,$com_attr.' '.$w_attr).Td($s,$com_attr.' '.$s_attr);
	}
?>